home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 21 / AACD 21.iso / AACD / Utilities / Help / locale / help / english / sys / failat.doc < prev    next >
Encoding:
Text File  |  2000-10-06  |  1.6 KB  |  61 lines

  1. FAILAT
  2.  
  3. Instructs a command sequence not to fail unless a given error condition is
  4. returned.
  5.  
  6. Format
  7.  
  8. FAILAT [<n>]
  9.  
  10. Template
  11.  
  12. RCLIM/N
  13.  
  14. Location
  15.  
  16. Internal
  17.  
  18. Commands indicate that they have failed by setting a nonzero return code. The
  19. return code, normally 5, 10, or 20, indicates the severity of the error. A
  20. return code greater than or equal to a certain limit, the fail limit,
  21. terminates a sequence of non-interactive commands (commands specified after
  22. RUN or in a script).
  23.  
  24. Use the FAILAT command to alter the fail limit RCLIM (Return Code Limit) from
  25. its initial value of 10. If you increase the limit, you indicate that certain
  26. classes of error should not be regarded as fatal and that execution of
  27. subsequent commands can proceed after the error. The argument must be a
  28. positive number. The fail limit is reset to the initial value of 10 on exit
  29. from the command sequence.
  30.  
  31. If the argument is omitted, the current fail limit is displayed.
  32.  
  33. Example:
  34.  
  35. Assume a script contains the following lines:
  36.  
  37. COPY DF0:MyFile to RAM:
  38. ECHO "MyFile being copied."
  39.  
  40. If MyFile cannot be found, the scripts is aborted and the following message
  41. appears in the Shell window:
  42.  
  43. COPY: object not found
  44. COPY failed returncode 20:
  45.  
  46. However, if you changed the return code limit to higher than 20, the script
  47. continues even if the COPY command fails. For example, if you changed the
  48. script to read:
  49.  
  50. FAILAT 21
  51. COPY DF0:MyFile to RAM:
  52. ECHO "MyFile being copied."
  53.  
  54. Even if MyFile cannot be found, the script continues. The following message
  55. appears in the Shell window:
  56.  
  57. COPY: object not found
  58. MyFile being copied.
  59.  
  60. See also: ECHO, EXECUTE.
  61.